Cryptographic hashing algorithms typically function in a chained dependent fashion on a single buffer of data (e.g., message). The buffer of data is divided into blocks with a size of the blocks defined by a hashing algorithm, e.g., SHA-1, SHA-256, etc. The blocks are then processed serially according to a standard specification. An output of each block being processed is a hash digest that is used as input (i.e., initial digest) to processing a subsequent block of data in the buffer, thus the serial chaining constraint. Blocks are processed in this manner until each block of the data buffer has been processed. Computational intensity associated with executing a hashing algorithm combined with the serial nature of the processing results in a relatively long time for generating cryptographic hashes.
Cryptographic hashes may be utilized, for example, for secure loading of files when the files need to be authenticated. Such secure loading may occur, for example, during boot sequences or soon after boot sequences when an operating system may be running, but in a limited form, e.g., a single thread. The serial chaining constraint when determining cryptographic hashes can thus result in an unacceptably long duration associated with authenticating such files during the boot sequences.
Single instruction multiple data (SIMD) techniques may be used to accelerate, e.g., SHA-256 hashing, but such techniques typically utilize multiple independent data buffers that may require a multi-threaded environment. Such a multi-threaded environment may then require producer-consumer queues and/or significant re-architecting of the application and processing flow that is generally infeasible during, for example, the boot sequence.
Although the following Detailed Description will proceed with reference being made to illustrative embodiments, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art.